load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "virtual-repo",
    srcs = glob([
        "src/**/*.rs",
        "src/**/*.zst",
    ]),
    autocargo = {"cargo_toml_config": {
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "description": "Generate source control repo data on demand for testing purpose.",
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-virtual-repo",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    crate_root = "src/lib.rs",
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:twox-hash",
        "//eden/scm/lib/dag:dag",
        "//eden/scm/lib/eagerepo/trait:eagerepo-trait",
        "//eden/scm/lib/minibytes:minibytes",
        "//eden/scm/lib/storemodel:storemodel",
        "//eden/scm/lib/types:types",
        "//eden/scm/lib/util/factory:factory",
        "//eden/scm/lib/util/format-util:format-util",
        "//eden/scm/lib/virtual-repo/virtual-tree:virtual-tree",
        "//eden/scm/lib/zstdelta:zstdelta",
    ],
)
